//宁波城镇收入饼图
var nbUrbanIncome = echarts.init(document.getElementById('nb_urban_in'));
nb_urban_in_option = {
    backgroundColor: '#fff',
    tooltip: {
        trigger: 'item',
        //formatter: "{b} : {d}% <br/> {c}"
    },
    graphic: {
        elements: [{
            type: 'image',
            style: {
                //image: ImageUrl,
                width: 100,
                height: 100
            },
            left: 'center',
            top: 'center'
        }]
    },
    legend: {
        orient: 'horizontal',
        icon: 'circle',
        bottom: 20,
        x: 'center',
        textStyle: {
            color: '#FF8352'
        },
        data: urbanIncomeType
    },
    series: [{
        type: 'pie',
        radius: ['40%', '50%'],
        center: ['50%', '50%'],
        color: ['#0E7CE2', '#FF8352', '#E271DE', '#F8456B'],
        data: urbanIncomeList,
        labelLine: {
            normal: {
                show: true,
                length: 40,
                length2: 80,
                lineStyle: {
                    color: '#12EABE',
                    width: 2
                },
                emphasis:{
                    show:true,
                }
            }
        },
        label: {
            normal: {
                //formatter: '{b|{b}}\n{hr|}\n{c|{c}} {d|{d}%}',
                formatter: '{d|{d}%}\n{hr|}\n{b|{b}}',
                rich: {
                    b: {
                        fontSize: 14,
                        color: '#12EABE',
                        align: 'center',
                        padding: 4,
                    },
                    hr: {
                        borderColor: '#12EABE',
                        width: '100%',
                        borderWidth: 2,
                        height: 0
                    },
                    d: {
                        //color: '#eee',
                        backgroundColor: '#334455',
                        padding: [0,4,4, 4],
                        borderRadius: 2,
                        fontSize: 18,
                        color: '#fff',
                        align: 'left',
                        //padding: 4
                    },
                    c: {
                        backgroundColor: '#334455',
                        padding: [2, 4],
                        borderRadius: 2,
                        fontSize: 20,
                        color: '#fff',
                        align: 'left',
                        padding: 4
                    }
                }
            },

        },
        emphasis:{
            label: {
                show:true,
                //formatter: '{b|{b}}\n{hr|}\n{c|{c}} {d|{d}%}',
                formatter: '{d|{d}%}\n{hr|}\n{b|{b}}',
                rich: {
                    b: {
                        fontSize: 14,
                        color: '#FF8352',
                        align: 'center',
                        padding: 4,
                    },
                    hr: {
                        borderColor: '#FF8352',
                        width: '100%',
                        borderWidth: 2,
                        height: 0
                    },
                    d: {
                        //color: '#eee',
                        backgroundColor: '#334455',
                        padding: [0,4,4, 4],
                        borderRadius: 2,
                        fontSize: 18,
                        color: '#FF8352',
                        align: 'left',
                        //padding: 4
                    },
                    c: {
                        backgroundColor: '#334455',
                        padding: [2, 4],
                        borderRadius: 2,
                        fontSize: 20,
                        color: '#fff',
                        align: 'left',
                        padding: 4
                    }
                }
            },

        }
    }]
};
nbUrbanIncome.setOption(nb_urban_in_option);